
# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo08
# Description:
# Author:       98745
# Date:         2019/3/3
#-------------------------------------------------------------------------------

class R():
    def __init__(self):
        self.l=0
        self.t=0
    def set(self,p):
        self.l,self.t=p
    def get(self):
        return self.l,self.t
    def dele(self):
        print('属性已被删除')
        self.l=0
        self.t=0
    per=property(get,set,dele)
r=R()
r.l=10
r.t=20
print('l=',r.l)
print('t=',r.t)

print('per','=',r.per)
r.per=100,200
print('per','=',r.per)
del r.per
print(r.per)
r.per=30,40
print('per','=',r.per)